package com.seleniti.enpareja.controller.control.factory;

import org.ioc.commons.flowcontrol.appcontroller.AppController;
import org.ioc.commons.flowcontrol.common.Params;
import org.ioc.commons.flowcontrol.eventbus.EventBus;
import org.ioc.commons.flowcontrol.eventbus.IsEvent;
import org.ioc.commons.flowcontrol.operationmanager.IsOperation;
import org.ioc.commons.flowcontrol.operationmanager.OperationManagerBinder;
import org.ioc.commons.ui.HasOneWidget;

public interface EnParejaAppController extends AppController {

	public static class Parameters {

		public boolean forceLog;
	}

	@interface Performs {
		EnParejaAppController.Operation[] value();
	}

	@interface Fires {
		EnParejaAppController.Event[] value();
	}

	public enum Event implements IsEvent {
		ApplicationReady
	}

	public enum Operation implements IsOperation {
		LoadingInitialData, LoadingLoggedUserInfo;
	}

	EventBus<Event> eventBus();

	OperationManagerBinder<Operation> operationManager();

	@Override
	@Performs(Operation.LoadingInitialData)
	@Fires(Event.ApplicationReady)
	@Params(Parameters.class)
	public void run(HasOneWidget parentView, Object... params);

	public Parameters getParameters();

	void reload();

}
